<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <!-- <button id="btn" onclick="function(event){console.log(event);}">button</button> -->
    <button id="btn">button</button>
    <script>
        /*
            特性绑定
            属性绑定
            标准事件绑定

            this
            event
        */
        const btn = document.getElementById('btn');
        // btn.onclick = function (e) {
        //     console.log(e);
        // }
        btn.addEventListener('click', function (e) {
            console.log(e.type);
            console.log(e.currentTarget);
            console.log(e.clientX, e.clientY);
        })
    </script>
</body>

</html>